// 包装 i-input 组件
import { extractModel } from '@/utils/tools'

export default {
    name: 'c-i-input',
    functional: true,

    render(h, context){
        
        let {value, callback, conf} = extractModel(context);
        let { 
            wrap,
            spellcheck,
            autocomplete,
            autofocus,
            number,
            autosize,
            rows,
            icon,
            maxlength,
            readonly,
            disabled,
            clearable,
            type,
            size, 
            placeholder
        } = conf

        return (
            <i-input
            
            value={value}
            onInput={callback}
            
            wrap={wrap}
            spellcheck={spellcheck}
            autocomplete={autocomplete}
            autofocus={autofocus}
            number={number}
            autosize={autosize}
            rows={rows}
            icon={icon}
            maxlength={maxlength}
            readonly={readonly}
            disabled={disabled}
            clearable={clearable}
            type={type}
            size={size || 'small'}
            placeholder={placeholder || '请输入内容'}>

            </i-input>
        )
        
        
        
    }
    
    
}